<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="books.js"></script>
    <script src="bookService.js"></script>
    <style>
        .books {
            width: 500px;
            height: 500px;
            background-color: white;
        }

        .showDiv {
            width: 500px;
            height: 300px;
            background-color: pink;
            visibility: hidden;
            position: relative;
        }

        .showDiv > div {
            margin-top: 20px;
        }

        .showDiv > img {
            position: absolute;
            top: 0px;
            left: 330px;
        }

        .buyDiv {
            background-color: rgba(266, 0, 0, 0.5);
            left: 0px;
            top: 0px;
            width: 100%;
            height: 100%;
            visibility: hidden;
            position: absolute;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .contentDiv {
            width: 400px;
            height: 400px;
            background-color: whitesmoke;
            border: 1px solid white;
            padding: 50px;
        }
    </style>
</head>
<body>
<div class="books" id="showBookDiv">
    <table border="1" width="100%" style="border-spacing:0px">
        <thead>
        <tr>
            <th>图书照片</th>
            <th>图书名字</th>
            <th>作者</th>
            <th>销售价</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody id="data"></tbody>
    </table>

</div>
图书名:<input type="text" name="bookName" id="bookName">
<input type="button" value="查找" onclick="showBooks()">
<div class="showDiv" id="showDiv">
    <div>图书名：<span id="bookSpan"></span></div>
    <br>
    <div>作者:<span id="authorSpan"></span></div>
    <br>
    <div>出版时间：<span id="dateSpan"></span></div>
    <br>
    <div>售价：<span id="priceSpan"></span></div>
    <img src="" id="imgSrc">
</div>
<div class="buyDiv" id="showBuy">
    <div class="contentDiv">
        <table border="1" width="100%" style="border-spacing:0px">
            <thead>
            <tr>
                <th>商品</th>
                <th>单价</th>
                <th>数量</th>
                <th>总价</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody id="data1"></tbody>
        </table>
      价格：  <span id="data2"></span>
        <input type="button" value="继续购物" onclick="quit()">
    </div>
</div>
</body>
</html>